//传统javascript
// let person = {
//     username: '陈小春',
//     age: '32',
//     sing: function (){
//         console.log('《相依为命》')
//     }
// }
let username = '陈小春'
let age = 32
let sing = function (){
    console.log('《相依为命》')
}
// let person = {
//     username: username,
//     age: age,
//     sing: sing
// }
// 如果声明变量与变量名称相同，可以简写为：
let person = {
    username,
    age,
    sing
}
console.log(person.username)
console.log(person.age)
sing()